package com.example.houselease.security;

import lombok.Getter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 自定义类，继承`User`类
 * 展示当事人数据
 * */
@ToString(callSuper = true)
public class AdminDetails extends User {

    @Getter
    private Long id;


    public AdminDetails(Long id, String username, String password, boolean enabled, Collection<? extends GrantedAuthority> authorities) {
        super(username,password,enabled,true,true,true, authorities);
        this.id = id;
    }
}
